﻿using Common.Enums;

namespace Domain.Entities.Tenants;

/// <summary>
/// 租户管理
/// </summary>
public class Tenant : IEntity<string>
{
    /// <summary>
    /// 租户唯一标识
    /// </summary>
    public string Id { get; set; } = Guid.NewGuid().ToString();
    /// <summary>
    /// 租户名称
    /// </summary>
    public string? Name { get; set; }
    /// <summary>
    /// 租户描述
    /// </summary>
    public string? Description { get; set; }
    /// <summary>
    /// 租户数据库类型
    /// </summary>
    public DbProviderType? DbProviderType { get; set; }
    /// <summary>
    /// 租户数据库连接字符串
    /// </summary>
    public string? ConnectionString { get; set; }
    /// <summary>
    /// 租户数据隔离模式
    /// </summary>
    public MultiTenancyIsolationType IsolationType { get; set; }
    /// <summary>
    /// 是否启用
    /// </summary>
    public bool? Enabled { get; set; } = true;
    /// <summary>
    /// 是否为默认租户
    /// </summary>
    public bool IsDefault { get; set; } = false;
}
